<template>
  <el-form>
    <el-form-item label="中心频率">
      <el-input
        v-model="form.centerfreIn"
        type="number"
      >
        <template #append>
          <el-select v-model="form.cfUnit">
            <el-option
              v-for="unit in units"
              :key="unit.value"
              :label="unit.label"
              :value="unit.value"
            />
          </el-select>
        </template>
      </el-input>
    </el-form-item>

    <el-form-item label="中频带宽">
      <el-input
        v-model="form.bandWidth"
        type="number"
      >
        <template #append>
          <el-select v-model="form.bwUnit">
            <el-option
              v-for="unit in units"
              :key="unit.value"
              :label="unit.label"
              :value="unit.value"
            />
          </el-select>
        </template>
      </el-input>
    </el-form-item>

    <el-form-item label="分辨率">
      <el-input
        v-model="form.resolutionRatio"
        type="number"
      >
        <template #append>
          <el-select v-model="form.rrUnit">
            <el-option
              v-for="unit in units"
              :key="unit.value"
              :label="unit.label"
              :value="unit.value"
            />
          </el-select>
        </template>
      </el-input>
    </el-form-item>
    <el-form-item>
      <div style="display: flex;justify-content: center; flex: 1;" class="mt-4">
        <el-button size="large" style="width: 30%;">分析</el-button>
        <el-button size="large" style="width: 30%;margin-left: 32px;">侧向</el-button>
      </div>
    </el-form-item>
  </el-form>
</template>
<script setup>
  const form = ref({
    centerfreIn: 100,
    bandWidth: 100,
    resolutionRatio: 5000,
    cfUnit: 1,
    bwUnit: 1,
    rrUnit: 1
  })
  const units = [
    { label: 'GHz', value: 0 },
    { label: 'MHz', value: 1 },
    { label: 'KHz', value: 2 },
    { label: 'Hz', value: 3 },
  ]
</script>
